import Mock from 'mockjs'


/**
 *  1. 数据模拟
 *  2. ajax拦截
 * */

/*const roles = [
    {
        id: '1',
        roleName: '超级管理员',
        isUsed: true,
    }, {
        id: '2',
        roleName: '普通管理员',
        isUsed: true,
    }
]*/




const data = Mock.mock({
    "list|5":[
        {
            "id|+1":1,
             "roleName":"@cname",
              "isUsed|1":[true,false],
        }
    ]
})

Mock.mock('http://test.org/role', 'get', {
    data: data.list
});